<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>用户管理</title>
    </head>
    <body>
        <a href="/user/add/">新建</a>
        <table>
            <thead>
                <tr>
                    <th>用户名</th>
                    <th>性别</th>
                    <th>地址</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{ range .users }}
                    <tr>
                        <td>{{ .Name }}</td>
                        <td>{{ if .Sex }}男{{ else }}女{{ end }}</td>
                        <td>{{ .Addr }}</td>
                        <td>
                            <a>编辑</a>
                            <a href="/user/delete/?id={{ .ID }}">删除</a>
                        </td>
                    </tr>
                {{ end }}
            </tbody>
        </table>
    </body>
</html>
